package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwCodeInfo implements Serializable {

    /**
     * identifier field
     */
    private Long codeId;

    /**
     * persistent field
     */
    private String codeValue;

    /**
     * persistent field
     */
    private String codeName;

    /**
     * persistent field
     */
    private String codeType;

    /**
     * full constructor
     */
    public PwCodeInfo(java.lang.Long codeId, java.lang.String codeValue, java.lang.String codeName, java.lang.String codeType) {
        this.codeId = codeId;
        this.codeValue = codeValue;
        this.codeName = codeName;
        this.codeType = codeType;
    }

    /**
     * default constructor
     */
    public PwCodeInfo() {
    }

    public java.lang.Long getCodeId() {
        return this.codeId;
    }

    public void setCodeId(java.lang.Long codeId) {
        this.codeId = codeId;
    }

    public java.lang.String getCodeValue() {
        return this.codeValue;
    }

    public void setCodeValue(java.lang.String codeValue) {
        this.codeValue = codeValue;
    }

    public java.lang.String getCodeName() {
        return this.codeName;
    }

    public void setCodeName(java.lang.String codeName) {
        this.codeName = codeName;
    }

    public java.lang.String getCodeType() {
        return this.codeType;
    }

    public void setCodeType(java.lang.String codeType) {
        this.codeType = codeType;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("codeId", getCodeId())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwCodeInfo)) return false;
        PwCodeInfo castOther = (PwCodeInfo) other;
        return new EqualsBuilder()
                .append(this.getCodeId(), castOther.getCodeId())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getCodeId())
                .toHashCode();
    }

}
